package com.mall.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.mall.Enum.Pay;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author xiao-chen
 * @since 2023-04-20
 */
@Data
@TableName("t_order_detail")
@AllArgsConstructor
@NoArgsConstructor
public class OrderDetail implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id")
    private Long id;

    /**
     * 商品id
     */
    private Long waresId;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 数量
     */
    private Integer num;

    /**
     * 总金额
     */
    private BigDecimal amount;

    /**
     * 创建时间
     */

    private LocalDateTime createDate;

    /**
     * 是否收货
     */
    private Integer isConfirm;

    /**
     * 收货时间
     */
    private LocalDateTime receiveDate;

    /**
     * 备注
     */
    private String message;

    /**
     * 是否支付 支付失败 0 未支付1 支付成功2
     */
    @TableField("is_pay")
    private Pay isPay;
    /**
     * 收货地址
     */
    private String receiveAddress;
    /**
     * 订单编号
     */
    private Long orderId;
    /**
     * 购买商品所属类别
     */
    private Long categoryId;

}
